package com.gullmall.common.constant;

/**
 * 关于库存的常量
 */
public class WareConstant {

    /**
     * 采购单的状态
     * 状态[0新建，1已分配，2已领取，3已完成，4有异常]
     */
    public enum PurchaseStatusEnum {
        CREATED(0, "新建"),
        ASSIGNED(1, "已分配"),
        RECEIVED(2, "已领取"),
        FINISHED(3, "已完成"),
        FAILED(4, "有异常");

        private Integer code;
        private String msg;

        PurchaseStatusEnum(Integer code, String msg) {
            this.code = code;
            this.msg = msg;
        }

        public Integer getCode() {
            return code;
        }

        public String getMsg() {
            return msg;
        }
    }

    /**
     * 采购需求的状态
     * 状态[0新建，1已分配，2正在采购，3已完成，4采购失败]
     */
    public enum PurchaseDetailStatusEnum{
        CREATED(0, "新建"),
        ASSIGNED(1, "已分配"),
        PURCHASING(2, "正在采购"),
        FINISHED(3, "已完成"),
        FAILED(4, "采购失败");

        private Integer code;
        private String msg;

        PurchaseDetailStatusEnum(Integer code, String msg) {
            this.code = code;
            this.msg = msg;
        }

        public Integer getCode() {
            return code;
        }

        public String getMsg() {
            return msg;
        }
    }
}
